﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Schooll.Model;
using NHibernate.Expression;

public partial class Admin_datosPersonales : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        fillAlumno();
       
    }

    private void fillAlumno()
    {
        try

        {

            int idAlumno;

            if (Request["idAlumno"] != null)
            {
                idAlumno = int.Parse(Request["idAlumno"]);
            }
            else
            {
                AlumnosCurso ac = AlumnosCurso.Buscar("idalumnocurso=" + Request["id"].ToString());
                idAlumno = ac.IdAlumno;
            }
                //Alumnos a = Alumnos.Buscar("idalumno=" + idAlumno);
                Alumno a = Alumno.FindFirst(Expression.Sql("idalumno=" + idAlumno));
            lblAlumno.Text = a.Apellido + ',' + a.Nombre;
            lblDireccion.Text = a.Domicilio;
            lblTelefonos.Text = a.Telefono;
        }
        catch (Exception e)
        {
            Response.Write("No se pudo recuperar la informacíon del alumno");
        }

    }
}
